package com.qtzw.config;

import com.qtzw.filter.LoginInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

public class LoginAdapter extends WebMvcConfigurerAdapter {

    @Autowired
    LoginInterceptor adminLoginInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(adminLoginInterceptor).addPathPatterns("/manager/**").excludePathPatterns("/login/**");
        super.addInterceptors(registry);
    }
}
